generator functions application